#include<iostream>
#include<functional>
using namespace std;

class Test
{
public:
	void PrintSque(int i)
	{
		cout<< i * i << "\n"; 
	}
};

int main(void)
{
	Test obj;
	function<void (int i)> f1 = bind(&Test::PrintSque, &obj, placeholders::_1);
	f1(123);
	
	function<void (Test*, int)> f2 = &Test::PrintSque;
	f2(&obj, 12);
	
	function<void (Test&, int)> f3 = &Test::PrintSque;
	f3(obj, 23);
	
	return 0;
}
